<?php $this->load->view('admin_home/_header') ?>
<?php $this->load->view('message') ?>
<script tyep="text/javascript">
  $().ready(function(){
    $("#module_li").addClass("active"); 

    $('.selectpicker').selectpicker({ 
  });
    $("#big_lecture_edit_form").validate({
        rules:{
            big_lecture_name:
            {
                required:true,
                maxlength:100
            },
        }
    });   
  });
  function delete_item(id)
    {
        if(confirm("将删除本门课程及其该课程的所有模块，删除后不可恢复，确定吗？"))
            location.href="<?php echo site_url('admin_class/big_lecture_delete').'/'?>"+id;
    }
</script>

<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">编辑课程</h3>
        </div>
        <div class="panel-body">
            <?php echo validation_errors(); ?>
            <form id="big_lecture_add_form" method="post" class="form-horizontal"  enctype="multipart/form-data" action="<?php echo site_url('admin_class/big_lecture_edit')?>" >
                <fieldset>
                    <input type="text" id="big_lecture_id" name="big_lecture_id" value="<?=$big_lecture['id']?>" class="hidden">
                    <div class="form-group">
                        <label class="col-lg-2 control-label">名称:</label>
                        <div class="col-lg-8">
                            <input class="form-control" id="big_lecture_name" name="big_lecture_name" value="<?=$big_lecture['name']?>" />
                        </div>

                    </div>
                    <div class="form-group">
                        <div class="col-lg-2 col-lg-offset-2">
                            <button type="submit" class="btn btn-primary">提交</button>
                        </div>
                        <div class="col-lg-8">
                            <a onclick="delete_item(<?=$big_lecture['id']?>)" href="#" class="btn btn-primary ">删除本门课程</a>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>

<?php $this->load->view('admin_home/_footer')?>